#ifndef __MATHANDPHYSICS_H__
#define __MATHANDPHYSICS_H__
class Vector2D
{
	public :
		 
		float x;
		float y;
		Vector2D(){};
		Vector2D(float _x, float _y):x(_x),y(_y){};
		Vector2D(Vector2D unitVector, float magnitude);
		~Vector2D(){};

		float dotProduct(Vector2D& second){return x*second.x+y*second.y;};
		void normalise();
		float length();

		Vector2D operator= (const Vector2D& x);
};

Vector2D operator- (const Vector2D& x, const Vector2D& y);
Vector2D operator+ (const Vector2D& x, const Vector2D& y);
Vector2D operator* (const Vector2D& x, const Vector2D& y);

Vector2D operator+ (const Vector2D& x, const float& y);
Vector2D operator* (const Vector2D& x, const float& y);

Vector2D operator+ (const float& x, const Vector2D& y);
Vector2D operator* (const float& x, const Vector2D& y);
#endif
